<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>3个数相加</title>
    <script>
        function show() {
            let a = document.getElementById('a').value;
            let b = document.getElementById('b').value;
            let c = document.getElementById('c').value;
            a = parseInt(a);
            b = parseInt(b);
            c = parseInt(c);
            let num = a + b + c;
            document.getElementById("d").value = num;
        }
    </script>
</head>
<body>
    <input id="a"/>+<input id="b"/>+<input id="c"/><br/>
    =<input id="d" readonly/>
    <button onclick="show()">计算</button>
</body>
</html>